/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package cz.swosh.stomp.ejb;

import java.io.Serializable;
import java.util.Collection;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToMany;

/**
 *
 * @author swosh
 */
@Entity
public class RolePermission implements Serializable{
@Id
    private String role;
    @Column(nullable=false)
private String permission;
@ManyToMany(cascade=CascadeType.ALL, mappedBy="rolePermissions")
private Collection<AppUser> appUsers;
    
    public String getRole() {
        return role;
    }

    public void setRole(String role){
        this.role = role;
    }

    public String getPermission(){
        return permission;
    }

    public void setPermission(String permission) {
        this.permission = permission;
    }

    public Collection<AppUser> getAppUsers(){
        return appUsers;
    }

    public void setAppUsers(Collection<AppUser> appUsers){
        this.appUsers = appUsers;
    }
}
